import React, { useState } from "react"


export default function App() {
  const [isHot,setIsHot] = useState(true)
  const [person,setPerson] = useState(['张三','李四','王五'])

 const setWeather = ()=>{
    setIsHot(!isHot)
 }

  return (
    <div>
      <p>今天的天气是{isHot? '晴天':'暴雨'}</p>
      <button onClick={setWeather}>点击切换</button>
      <br/>
      <br/>
      <hr />
      <ul>
        {
          person.map(item=>{
            return <li>{item}</li>
          })
        }
      </ul>
    </div>
  )
}

